<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head>
    <title>Thymeleaf Demo</title>
</head>
<body>

<div style="display: flex; justify-content: center">
    <form action="/user/register" method="post" name="ThisForm">
        <table>
            <!-- 必须包含 CSRF 令牌 -->
            <input type="hidden" name="${_csrf.parameterName}" value="${_csrf.token}"/>
            <tr>
                <td>账 户：</td>
                <td><input class="username" name="name" type="text" /></td>
            </tr>
            <tr>
                <td>密 码：</td>
                <td><input class="password" name="password" type="password" /></td>
            </tr>
            <tr>
                <td></td>
                <td><input type="submit" class="login-btn" value="注册" /></td>
            </tr>
        </table>
    </form>
</div>
</body>
</html>